<template>
    <lightning-card title="ApiSpread" icon-name="custom:custom14">
        <div class="slds-var-m-around_medium">
            <lightning-input
                name="firstName"
                label="First Name"
                onchange={handleChange}
                value={props.firstName}
            ></lightning-input>
            <lightning-input
                name="lastName"
                label="Last Name"
                onchange={handleChange}
                value={props.lastName}
            ></lightning-input>
            <c-child lwc:spread={props}></c-child>
        </div>

        <c-view-source source="lwc/apiSpread" slot="footer">
            Pass data to a child component using lwc:spread directive
        </c-view-source>
    </lightning-card>
</template>
